package com.hema.auction.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hema.auction.R;
import com.hema.auction.bean.GoodsInfo;
import com.hema.auction.widget.view.HotAuctionView;

import java.util.List;

/**
 * author by john
 */

public class IndexAuctionAdapter extends BaseQuickAdapter<GoodsInfo, BaseViewHolder> {

    public void setTenZone(boolean tenZone) {
        isTenZone = tenZone;
    }

    public boolean isTenZone;

    public IndexAuctionAdapter(List<GoodsInfo> data) {
        super(R.layout.layout_index_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, GoodsInfo item) {
        item.setTenZone(isTenZone);
        HotAuctionView hotAuctionView = helper.getView(R.id.view_hot_auction);
        hotAuctionView.setInfo(item);
        helper.addOnClickListener(R.id.iv_collection);
    }

}
